let mysql = require("mysql");

let connection = mysql.createConnection({
    host     : 'localhost',
    user     : 'root',
    password : 'shuhexiansheng',
    database : 'sys'
});

connection.connect();

connection.query('SELECT * FROM host_summary', function (error, results, fields) {
    if (error) throw error;
    console.log(results);
    console.log(fields);
});

connection.end();